'use strict';
const db = uniCloud.database() //对数据库的对象获取；

exports.main = async (event, context) => {
    const collection = db.collection('record-of-turtle') //对record-of-turtle数据库的获取；
    // 添加数据
    let res = await collection.add({
        turtle_name: event.turtle_name,
		turtle_age: event.turtle_age,
		turtle_varieties: event.turtle_varieties,
		turtle_url: event.image_url,
		user_id: event.user_id
    })
 
    return {
    	code: 200,
    	message: 'ok',
    	data: event
    }
}